package com.caiying.dota.spider;

import java.io.IOException;
import java.net.MalformedURLException;
import java.util.ArrayList;

import org.junit.Test;

import com.caiying.dota.spider.entity.Hero;
import com.caiying.dota.spider.parser.dota.HeroParser;


public class SpiderMain {

	@Test
	public void spiderHero() throws MalformedURLException, IOException {
		ArrayList<Hero> hero_str = HeroParser.getHerosForList(HeroParser.HeroType.STRENGTH);
		for(Hero hero : hero_str){
			HeroParser.hero(hero.getHero_link());
		}
		
		ArrayList<Hero> hero_agi = HeroParser.getHerosForList(HeroParser.HeroType.AGILE);
		for(Hero hero : hero_agi){
			HeroParser.hero(hero.getHero_link());
		}
		
		ArrayList<Hero> hero_int = HeroParser.getHerosForList(HeroParser.HeroType.INTELLIGENCE);
		for(Hero hero : hero_int){
			HeroParser.hero(hero.getHero_link());
		}
	}
}
